<?php
’net start mysql`;//启动数据库
‘git config --global user.name "魏泰明"`;//设置提交的用户名及邮箱
‘git config --global user.email ""`;
$db=new PDO( dsn: "mysql:host=localhost", username:'root',password:'12qwas');
$db->setAttribute( attribute: PDO::ATTR_DEFAULT_FETCH_MODE,value:PDO::FETTCH_ASSOC);
$db->exec( statement: 'create database if not exists db2');
$db->exec( statement:'use db2');
$db->exec( statement:"create table if not exists students (xh varchar(9) not null primary key,namevarchar(50),tel varchar(11),pwd varchar(20) default'1235',isAdmin tinyint(1) default 0)");
$r=$db->exec( statement: 'delete from students');
echo“删除记录个数：{$r}条\n";
$r=$db->exec( statement:"insert into students(xh,name,tel) values
                    ('213110601',张三','11111111111'),
                    ('213110602'，'李四','22222222222'),
                    ('213110683','王五','33333333333'),
                    ('21311871','杨柳','44444444444')");
$r=$db->exec( statement:"insert into students(xh,name,tel,isAdmin) values('admin','管理员','44444444444')");
echo"插入记录：{$r}条\n";
1